<template>
	<view class="content">
		<view class="order-item" v-for="item in list" :key="item.id" @click="$navTo('../order/details?id='+item.id)">
			<image class="goods-img" :src="item.logo" mode="aspectFill"></image>
			<view class="right">
				<view class="title clamp">{{item.title}} - {{item.supname}}</view>
				<view class="label">
					<!-- <text class="time">{{item.createtime}}</text> -->
					<!-- <text class="sattus1">已退款</text> -->
					<text class="sattus2">支付成功 <text v-if="item.status==3" style="color: #8405dc;">-已核销</text><text
							v-else style="color: darkred;">-未核销</text> </text>
					<text class="money">-{{item.price}}</text>
				</view>
				<view class="time">{{item.paytime}}</view>

			</view>
		</view>
		<view class="loading_message">
			<image v-show="isloading" src="@/static/business/loading.gif" mode=""></image>
			<text v-show="!ismore">到底了~</text>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'ZiOrder',
		props: {
			list: {
				type: Array,
				default: () => []
			},
			isloading: {
				type: Boolean,
				default: false
			},
			ismore: {
				type: Boolean,
				default: true
			}
		},
	}
</script>

<style lang="scss">
	.content {
		padding: 15upx 20upx;
	}

	.order-item {
		background: #fff;
		border-radius: 15upx;
		display: flex;
		padding: 20upx;
		margin-bottom: 20upx;

		image {
			border-radius: 10upx;
			height: 120upx;
			width: 120upx;
		}

		.right {
			padding-left: 20upx;
			line-height: 40upx;
			width: calc(100% - 140upx);

			.title {
				color: #000;
				font-weight: bold;
			}

			.label {
				display: flex;
				align-items: center;

				.time {
					color: #666;
					font-weight: bold;
				}

				.sattus1 {
					color: red;
					flex: 1;
					padding: 0 2upx;
				}

				.sattus2 {
					color: #068723;
					flex: 1;
					padding: 0 2upx;
					font-weight: bold;
				}

				.money {
					color: #000;
				}
			}
		}
	}

	.loading_message {
		color: #0062CC;
		padding: 20upx;
		text-align: center;
	}

	.loading_message image {
		height: 50upx;
		width: 50upx;
	}
</style>